package org.knowm.xchange.okcoin.v3.dto.account;

import com.fasterxml.jackson.databind.PropertyNamingStrategy.SnakeCaseStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
@JsonNaming(SnakeCaseStrategy.class)
public class FuturesBillsResponse {

  /** ID of the bill record */
  private String ledgerId;
  /** The time that the record is created */
  private Date timestamp;
  /** Amount */
  private BigDecimal amount;
  /**
   * Balance of positions opened. Balance positive if the open interest is long while negative if
   * short. The balance will be '0' if the type is fee.
   */
  private BigDecimal balance;

  private String currency;
  /** underlying，eg：BTC-USD BTC-USDT */
  private String underlying;
  /** Type of bill record */
  private String type;
  /**
   * If the type is generated by transaction, the order_id and instrument_id will be included in
   * details
   */
  private Details details;

  @Data
  @JsonNaming(SnakeCaseStrategy.class)
  public static class Details {
    private String orderId;
    private String instrumentId;
  }
}
